<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>CrossPageChannel (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">net.xpc.CrossPageChannel</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_messaging_AbstractChannel.html">
          goog.messaging.AbstractChannel
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    A communication channel between two documents from different domains.
Provides asynchronous messaging.


  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="http://closure-library.googlecode.com/git/closure/goog/demos/xpc/index.html">Demo</a></li>
            <li><a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/net/xpc/crosspagechannel.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_Disposable.html">goog.Disposable</a></span></td><td></td></tr>
  <tr><td><span class="type"><a href="class_goog_messaging_AbstractChannel.html">goog.messaging.AbstractChannel</a></span></td><td><span class="type"><a href="class_goog_Disposable.html">goog.Disposable</a></span></td></tr>
  <tr><td>goog.net.xpc.CrossPageChannel</td><td><span class="type"><a href="class_goog_messaging_AbstractChannel.html">goog.messaging.AbstractChannel</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.net.xpc.CrossPageChannel(<span><span class="arg">cfg</span>,&nbsp;<span class="arg">opt_domHelper</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cfg</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
        <div class="entryOverview">Channel configuration object.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_domHelper</span>
        : <span class="type">goog.dom.DomHelper=</span>
        <div class="entryOverview">The optional dom helper to
    use for looking up elements in the dom.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_net_xpc_CrossPageChannel.html">
              goog.net.xpc.CrossPageChannel
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.cleanUpIncompleteConnection_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">cleanUpIncompleteConnection_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Clean up after any incomplete attempt to establish and connect to a peer
iframe.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line504">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.close"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">close<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Closes the channel.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line609">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.connect"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">connect<span class="args">(<span class="arg">opt_connectCb</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Initiates connecting the channel. When this method is called, all the
information needed to connect the channel has to be available.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_connectCb</span>
        : <span class="type">Function=</span>
        <div class="entryOverview">The function to be called when the
channel has been connected and is ready to be used.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line549">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.continueConnection_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">continueConnection_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Continues the connection process once we're as sure as we can be that the
peer iframe has been created.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line567">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.createPeerIframe"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">createPeerIframe<span class="args">(<span class="arg">parentElm</span>,&nbsp;<span class="arg">opt_configureIframeCb</span>,&nbsp;<span class="arg">opt_addCfgParam</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type">HTMLIFrameElement</span>
      </div>


     <div class="entryOverview">
       Creates the iframe containing the peer page in a specified parent element.
This method does not connect the channel, connect() still has to be called
separately.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">parentElm</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">The container element the iframe is appended to.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_configureIframeCb</span>
        : <span class="type">Function=</span>
        <div class="entryOverview">If present, this function gets
    called with the iframe element as parameter to allow setting properties
    on it before it gets added to the DOM. If absent, the iframe's width and
    height are set to '100%'.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_addCfgParam</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">Whether to add the peer configuration as
    URL parameter (default: true).</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type">HTMLIFrameElement</span>&nbsp;
            The iframe element.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line448">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.createTransport_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">createTransport_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Creates the transport for this channel. Chooses from the available
transport based on the user agent and the configuration.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line316">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.determineTransportType_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">determineTransportType_<span class="args">()</span>
        </span>
        &#8658; <span class="type">goog.net.xpc.TransportTypes</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>
      </div>


     <div class="entryOverview">
       Determine which transport type to use for this channel / useragent.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">goog.net.xpc.TransportTypes</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>&nbsp;
            The best transport type.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line289">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.disposeInternal"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">disposeInternal<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line829">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.escapeServiceName_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">escapeServiceName_<span class="args">(<span class="arg">name</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Escape the user-provided service name for sending across the channel. This
URL-encodes certain special characters so they don't conflict with delimiters
used by some of the transports, and adds a special prefix if the name
conflicts with the reserved transport service name.

This is the opposite of <code> #unescapeServiceName_</code>.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">name</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The name of the service to escape.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The escaped service name.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line754">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getConfig"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getConfig<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Returns the configuration object for this channel.
Package private. Do not call from outside goog.net.xpc.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            The configuration object for this channel.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line221">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getIframeElement"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getIframeElement<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Returns a reference to the iframe-element.
Package private. Do not call from outside goog.net.xpc.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            A reference to the iframe-element.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line232">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getPeerConfiguration"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getPeerConfiguration<span class="args">()</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            Configuration-object to be used by the peer to
    initialize the channel.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line402">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getPeerUri"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getPeerUri<span class="args">(<span class="arg">opt_addCfgParam</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="class_goog_Uri.html">goog.Uri</a></span>
      </div>


     <div class="entryOverview">
       Returns the peer URI, with an optional URL parameter for configuring the peer
window.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_addCfgParam</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">Whether to add the peer configuration as
    URL parameter (default: true).</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="class_goog_Uri.html">goog.Uri</a></span>&nbsp;
            The peer URI.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line523">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getPeerWindowObject"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getPeerWindowObject<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Returns the window object the foreign document resides in.
Package private. Do not call from outside goog.net.xpc.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            The window object of the peer.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line254">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getRole"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getRole<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Returns the role of this channel (either inner or outer).

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The role of this channel.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line784">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getTransportName"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getTransportName<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Returns the tranport name in use for this channel.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The transport name.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line393">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.getTransportType"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getTransportType<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Returns the transport type in use for this channel.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            Transport-type identifier.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line384">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.isConnected"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isConnected<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the channel is connected.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line194">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.isMessageOriginAcceptable_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isMessageOriginAcceptable_<span class="args">(<span class="arg">opt_origin</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Returns whether an incoming message with the given origin is acceptable.
If an incoming request comes with a specified (non-empty) origin, and the
PEER_HOSTNAME config parameter has also been provided, the two must match,
or the message is unacceptable.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_origin</span>
        : <span class="type">string=</span>
        <div class="entryOverview">The origin associated with the incoming message.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the message is acceptable.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line819">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.isPeerAvailable"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isPeerAvailable<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Determines whether the peer window is available (e.g. not closed).
Package private. Do not call from outside goog.net.xpc.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the peer window is available.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line265">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.notifyConnected"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">notifyConnected<span class="args">(<span class="arg">opt_delay</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Package-private.
Called by the transport when the channel is connected.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_delay</span>
        : <span class="type">number=</span>
        <div class="entryOverview">Delay this number of milliseconds before calling
    the connection callback. Usage is discouraged, but can be used to paper
    over timing vulnerabilities when there is no alternative.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line628">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.notifyConnected_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">notifyConnected_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Alias for notifyConected, for backward compatibility reasons.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line651">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.notifyTransportError"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">notifyTransportError<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Called by the transport in case of an unrecoverable failure.
Package private. Do not call from outside goog.net.xpc.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line659">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.send"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">send<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line666">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.setPeerWindowObject"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setPeerWindowObject<span class="args">(<span class="arg">peerWindowObject</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the window object the foreign document resides in.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">peerWindowObject</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
        <div class="entryOverview">The window object of the peer.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line242">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.unescapeServiceName_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">unescapeServiceName_<span class="args">(<span class="arg">name</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Unescape the escaped service name that was sent across the channel. This is
the opposite of <code> #escapeServiceName_</code>.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">name</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The name of the service to unescape.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The unescaped service name.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line770">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.updateChannelNameAndCatalog"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">updateChannelNameAndCatalog<span class="args">(<span class="arg">name</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the channel name. Note, this doesn't establish a unique channel to
communicate on.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">name</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The new channel name.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line801">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.prototype.xpcDeliver"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">xpcDeliver<span class="args">(<span class="arg">serviceName</span>,&nbsp;<span class="arg">payload</span>,&nbsp;<span class="arg">opt_origin</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Delivers messages to the appropriate service-handler. Named xpcDeliver to
avoid name conflict with <code> deliver</code> function in superclass
goog.messaging.AbstractChannel.

Package private. Do not call from outside goog.net.xpc.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">serviceName</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The name of the port.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">payload</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The payload.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_origin</span>
        : <span class="type">string=</span>
        <div class="entryOverview">An optional origin for the message, where the
    underlying transport makes that available.  If this is specified, and
    the PEER_HOSTNAME parameter was provided, they must match or the message
    will be rejected.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line702">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_messaging_AbstractChannel.html">
              goog.messaging.AbstractChannel
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.connect"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">connect<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Immediately calls opt_connectCb if given, and is otherwise a no-op. If
subclasses have configuration that needs to happen before the channel is
connected, they should override this and <code> #isConnected</code>.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line79">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry protected">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.decodePayload"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">decodePayload<span class="args">(<span class="arg">serviceName</span>,&nbsp;<span class="arg">payload</span>,&nbsp;<span class="arg">objectPayload</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Converts the message payload into the format expected by the registered
service (either JSON or string).


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">serviceName</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The name of the service receiving the message.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">payload</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
        <div class="entryOverview">The contents of the message.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">objectPayload</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
        <div class="entryOverview">Whether the service expects an object or a
    plain string.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            The payload in the format expected by the service, or
    null if something went wrong.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line186">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.defaultService_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">defaultService_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       The default service to be run when no other services match.


     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line61">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry protected">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.deliver"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">deliver<span class="args">(<span class="arg">serviceName</span>,&nbsp;<span class="arg">payload</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Delivers a message to the appropriate service. This is meant to be called by
subclasses when they receive messages.

This method takes into account both explicitly-registered and default
services, as well as making sure that JSON payloads are decoded when
necessary. If the subclass is capable of passing objects as payloads, those
objects can be passed in to this method directly. Otherwise, the (potentially
JSON-encoded) strings should be passed in.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">serviceName</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The name of the service receiving the message.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">payload</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
        <div class="entryOverview">The contents of the message.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line132">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.disposeInternal"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">disposeInternal<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line205">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry protected">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.getService"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getService<span class="args">(<span class="arg">serviceName</span>,&nbsp;<span class="arg">payload</span>)</span>
        </span>
        &#8658; <span>?</span><span class="type">{callback: function((string</span><span>&nbsp;|&nbsp;</span><span>!</span><span class="type">Object)), objectPayload: boolean</span>
      </div>


     <div class="entryOverview">
       Find the service object for a given service name. If there's no service
explicitly registered, but there is a default service, a service object is
constructed for it.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">serviceName</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The name of the service receiving the message.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">payload</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
        <div class="entryOverview">The contents of the message.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type">{callback: function((string</span><span>&nbsp;|&nbsp;</span><span>!</span><span class="type">Object)), objectPayload: boolean</span>&nbsp;
            } The
    service object for the given service, or null if none was found.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line158">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.isConnected"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isConnected<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Always returns true. If subclasses have configuration that needs to happen
before the channel is connected, they should override this and
<code> #connect</code>.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line92">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.registerDefaultService"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">registerDefaultService<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line108">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.messaging.AbstractChannel.prototype.registerService"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">registerService<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line98">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_Disposable.html">
              goog.Disposable
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.Disposable.prototype.addOnDisposeCallback"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">addOnDisposeCallback<span class="args">(<span class="arg">callback</span>,&nbsp;<span class="arg">opt_scope</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Invokes a callback function when this object is disposed. Callbacks are
invoked in the order in which they were added.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">callback</span>
        : <span class="type">function(this:T</span>)<span>:?</span>
        <div class="entryOverview">The callback function.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_scope</span>
        : <span class="type">T=</span>
        <div class="entryOverview">An optional scope to call the callback in.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line211">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.Disposable.prototype.dispose"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">dispose<span class="args">()</span>
        </span>
        &#8658; <span class="type">void</span>
      </div>


     <div class="entryOverview">
       Disposes of the object. If the object hasn't already been disposed of, calls
<code> #disposeInternal</code>. Classes that extend <code> goog.Disposable</code> should
override <code> #disposeInternal</code> in order to delete references to COM
objects, DOM nodes, and other disposable objects. Reentrant.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">void</span>&nbsp;
            Nothing.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line172">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry protected">
       <td class="access"></td>






  <td>
    <a name="goog.Disposable.prototype.disposeInternal"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">disposeInternal<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend <code> goog.Disposable</code> should
override this method.
Not reentrant. To avoid calling it twice, it must only be called from the
subclass' <code> disposeInternal</code> method. Everywhere else the public
<code> dispose</code> method must be used.
For example:
<pre class="lang-js prettyprint">
  mypackage.MyClass = function() {
    goog.base(this);
    // Constructor logic specific to MyClass.
    ...
  };
  goog.inherits(mypackage.MyClass, goog.Disposable);

  mypackage.MyClass.prototype.disposeInternal = function() {
    // Dispose logic specific to MyClass.
    ...
    // Call superclass's disposeInternal at the end of the subclass's, like
    // in C++, to avoid hard-to-catch issues.
    goog.base(this, 'disposeInternal');
  };
</pre>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line245">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td class="deprecated">
    <a name="goog.Disposable.prototype.getDisposed"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getDisposed<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class="deprecatedMessage">Use <code> #isDisposed</code> instead.</span>
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the object has been disposed of.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line160">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.Disposable.prototype.isDisposed"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isDisposed<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the object has been disposed of.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line151">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.Disposable.prototype.registerDisposable"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">registerDisposable<span class="args">(<span class="arg">disposable</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Associates a disposable object with this object so that they will be disposed
together.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">disposable</span>
        : <span class="type"><a href="interface_goog_disposable_IDisposable.html">goog.disposable.IDisposable</a></span>
        <div class="entryOverview">that will be disposed when
    this object is disposed.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line199">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_net_xpc_CrossPageChannel.html">
              goog.net.xpc.CrossPageChannel
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.cfg_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">cfg_</span>
        : 
     </div>


     <div class="entryOverview">
       The configuration for this channel.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line77">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.connectionDelay_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">connectionDelay_</span>
        : <span class="type"><a href="class_goog_async_Delay.html">goog.async.Delay</a></span>
     </div>


     <div class="entryOverview">
       A delay between the transport reporting as connected and the calling of the
connection callback.  Sometimes used to paper over timing vulnerabilities.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line160">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line63">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.deferredDeliveries_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">deferredDeliveries_</span>
        : 
     </div>


     <div class="entryOverview">
       Collects deferred function calls which will be made once the connection
has been fully set up.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line101">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.domHelper_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">domHelper_</span>
        : <span class="type"><a href="class_goog_dom_DomHelper.html">goog.dom.DomHelper</a></span>
     </div>


     <div class="entryOverview">
       The dom helper to use for accessing the dom.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line93">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.iframeElement_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">iframeElement_</span>
        : 
     </div>


     <div class="entryOverview">
       Reference to the iframe-element.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line212">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.name"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">name</span>
        : 
     </div>


     <div class="entryOverview">
       The name of the channel. Please use
<code>updateChannelNameAndCatalog</code> to change this from the transports
vs changing the property directly.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line85">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.peerLoadHandler_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">peerLoadHandler_</span>
        : <span class="type"><a href="class_goog_events_EventHandler.html">goog.events.EventHandler</a></span>
     </div>


     <div class="entryOverview">
       An event handler used to listen for load events on peer iframes.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line108">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.peerWindowDeferred_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">peerWindowDeferred_</span>
        : <span class="type"><a href="class_goog_async_Deferred.html">goog.async.Deferred</a></span>
     </div>


     <div class="entryOverview">
       A deferred which is set to non-null while a peer iframe is being created
but has not yet thrown its load event, and which fires when that load event
arrives.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line170">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.peerWindowObject_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">peerWindowObject_</span>
        : 
     </div>


     <div class="entryOverview">
       Reference to the window-object of the peer page.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line204">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.state_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">state_</span>
        : 
     </div>


     <div class="entryOverview">
       The channel state.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line186">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.prototype.transport_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">transport_</span>
        : <span class="type"><a href="class_goog_net_xpc_Transport.html">goog.net.xpc.Transport</a></span>
     </div>


     <div class="entryOverview">
       The transport.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line178">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_messaging_AbstractChannel.html">
              goog.messaging.AbstractChannel
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.messaging.AbstractChannel.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line41">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry protected">
       <td class="access"></td>





  <a name="goog.messaging.AbstractChannel.prototype.logger"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">logger</span>
        : <span class="type"><a href="class_goog_debug_Logger.html">goog.debug.Logger</a></span>
     </div>


     <div class="entryOverview">
       Logger for this class.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line69">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.messaging.AbstractChannel.prototype.send"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">send</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line115">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.messaging.AbstractChannel.prototype.services_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">services_</span>
        : 
     </div>


     <div class="entryOverview">
       The services registered for this channel.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_messaging_abstractchannel.js.source.html#line50">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_Disposable.html">
              goog.Disposable
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.Disposable.prototype.creationStack"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">creationStack</span>
        : 
     </div>


     <div class="entryOverview">
       If monitoring the goog.Disposable instances is enabled, stores the creation
stack trace of the Disposable instance.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line144">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.Disposable.prototype.disposed_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">disposed_</span>
        : 
     </div>


     <div class="entryOverview">
       Whether the object has been disposed of.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line128">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.Disposable.prototype.onDisposeCallbacks_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">onDisposeCallbacks_</span>
        : 
     </div>


     <div class="entryOverview">
       Callbacks to invoke when this object is disposed.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_disposable_disposable.js.source.html#line136">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Static Methods</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.net.xpc.CrossPageChannel.disposeAll_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.net.xpc.CrossPageChannel.</span><span class="entryName">disposeAll_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Disposes all channels.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line845">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.TRANSPORT_SERVICE_ESCAPE_RE_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.net.xpc.CrossPageChannel.</span><span class="entryName">TRANSPORT_SERVICE_ESCAPE_RE_</span>
        : 
     </div>


     <div class="entryOverview">
       Regexp for escaping service names.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line141">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.TRANSPORT_SERVICE_UNESCAPE_RE_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.net.xpc.CrossPageChannel.</span><span class="entryName">TRANSPORT_SERVICE_UNESCAPE_RE_</span>
        : 
     </div>


     <div class="entryOverview">
       Regexp for unescaping service names.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line150">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.net.xpc.CrossPageChannel.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.net.xpc.CrossPageChannel.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_net_xpc_crosspagechannel.js.source.html#line63">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package net.xpc</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="net.xpc.CrossPageChannel"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
